package cn.yyh.serviceOrg.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author yang
 * @since 2021-07-10
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="TDepartment对象", description="")
public class Department implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "部门编号")
    private String sn;

    @ApiModelProperty(value = "部门名称")
    private String name;

    @ApiModelProperty(value = "部门的上级分类层级id")
    @TableField("dirPath")
    private String dirPath;

    @ApiModelProperty(value = "部门状态，0正常，1禁用")
    private Integer state;

    @ApiModelProperty(value = "部门管理员，关联Employee表id")
    private Long managerId;

    @ApiModelProperty(value = "上级部门")
    private Long parentId;

    private Employee manager;
    private Department parent;
    private List<Department> children;

}
